package hczc.longcai.com.hccrowdfunding.home.third_rankinglist.fragments;


import android.os.Bundle;

import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;

import java.util.ArrayList;
import java.util.List;

import hczc.longcai.com.hccrowdfunding.R;
import hczc.longcai.com.hccrowdfunding.home.third_rankinglist.adapters.RankingListAdapter;
import hczc.longcai.com.hccrowdfunding.home.third_rankinglist.beans.RankingListPopularity;

/**
 */
public class RankingListCrowdfundingFragment extends Fragment {


    private static final String TAG = "RankingListCrowfundingFragment";
    private ListView listView;
    private List<RankingListPopularity> list;
    private RankingListAdapter adapter;

    public RankingListCrowdfundingFragment() {
        // Required empty public constructor
    }

    @Override
    public void onResume() {
        super.onResume();
//        Log.d(TAG,"众筹达人榜");
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_ranking_list_crowdfunding, container, false);
        listView = ((ListView) view.findViewById(R.id.rankinglist_listview_crowdfunding));
        initDatas();
        adapter = new RankingListAdapter(getActivity(),list);
        listView.setAdapter(adapter);

        return view;

    }

    private void initDatas() {
        list = new ArrayList<>();
        RankingListPopularity popularity = new RankingListPopularity();
        popularity.setType(2);
        list.add(popularity);
        list.add(popularity);
        list.add(popularity);

    }


}
